﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Api.Common
{
    /// <summary>
    /// 網頁中會使用到的ajaxresult
    /// </summary>
    public class AjaxResult
    {
        public AjaxResult()
        {
            status = true;
            msg = string.Empty;
            data = null;
            url = string.Empty;
            islogin = false;
        }
        public bool status { get; set; }
        public string msg { get; set; }
        public object data { get; set; }
        public string url { get; set; }
        public bool islogin { get; set; }
    }

    /// <summary>
    /// JsonResult中data中的分頁數據模型
    /// </summary>
    public class PageData
    {
        public object items { get; set; }
        public long currentPage { get; set; }
        public long totalPages { get; set; }
        public long count { get; set; }
    }

    /// <summary>
    /// webapi 开放平台中使用的ApiResult
    /// </summary>
    public class ApiResult
    {
        public int status { get; set; }
        public string msg { get; set; }
        public object data { get; set; }
    }
}
